<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Welcome!</title>
    </h:head>
    <h:body>
        <ui:composition template="/Template/newTemplate.xhtml">>
        <ui:define name="content">
        <h:form>
            <h:inputTextarea value="#{managerBean.postIt}"></h:inputTextarea>
            <h:commandButton value="Submit" action="#{managerBean.submitPostIt(LoginBean.id)}"></h:commandButton>
            <h:dataTable value="#{managerBean.postits}" var="post">
                <h:column>
                    <h:outputText value="#{post.userId.username}"></h:outputText>
                </h:column>
                <h:column>
                    <h:outputText value="#{post.datePosted}"></h:outputText>
                </h:column>
                <h:column>
                    <h:outputText value="#{post.content}"></h:outputText>
                </h:column>
            </h:dataTable>
            
        </h:form>
        </ui:define>
        </ui:composition>
    </h:body>
</html>

